﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ContractManagermentSystem.DataAccess;
using ContractManagermentSystem.Entity;

namespace ContractManagermentSystem.Business
{
    public class RoleBus
    {
        private RoleDao _roleDao;

        public RoleBus()
        {
            _roleDao = new RoleDao();
        }

        public void CreateRole(Role role)
        {
            _roleDao.CreateRole(role);
        }

        public int CheckRoleName(string roleName)
        {
            return _roleDao.CheckRoleName(roleName);
        }

        public DataTable LoadAllRole()
        {
            return _roleDao.LoadAllRole();
        }

        public void ChangeStatusRole(Role role)
        {
            _roleDao.ChangeStatusRole(role);
        }

        public DataTable GetRoleById(Guid roleId)
        {
            return _roleDao.GetRoleById(roleId);
        }

        public void DeleteRoleById(Role role)
        {
            _roleDao.DeleteRoleById(role);
        }

        public void UpdateRoleById(Role role)
        {
            _roleDao.UpdateRoleById(role);
        }
    }
}
